// 系统名称
export const APPLICATION_CODE = "system";

// 员工状态枚举配置
export const EMPLOYEE_STATUS = {
  INIT: {
    label: "新建",
    color: "default",
  },
  ENABLE: {
    label: "启用",
    color: "success",
  },
  DISABLE: {
    label: "禁用",
    color: "error",
  },
};

// 角色状态枚举配置
export const ROLE_STATUS = {
  INIT: {
    label: "新建",
    color: "default",
  },
  ENABLE: {
    label: "启用",
    color: "success",
  },
  DISABLE: {
    label: "禁用",
    color: "error",
  },
};

// 性别枚举配置
export const GENDER_CONFIG = {
  MALE: {
    label: "男",
    color: "blue",
  },
  FEMALE: {
    label: "女",
    color: "red",
  },
};

// 通用辅助函数
export const getStatusConfig = (statusEnum, status) => {
  return statusEnum[status] || { label: "未知", color: "default" };
};

// 获取状态选项（用于下拉框）
export const getStatusOptions = (statusEnum) => {
  return Object.entries(statusEnum).map(([key, config]) => ({
    value: key,
    label: config.label,
  }));
};

// 状态判断辅助函数
export const STATUS_KEYS = {
  EMPLOYEE: {
    INIT: "INIT",
    ENABLE: "ENABLE",
    DISABLE: "DISABLE",
  },
  ROLE: {
    INIT: "INIT",
    ENABLE: "ENABLE",
    DISABLE: "DISABLE",
  },
};
